package com.dianping.cat.core.dal;

import java.util.Date;
import java.util.List;
import org.unidal.dal.jdbc.AbstractDao;
import org.unidal.dal.jdbc.DalException;
import org.unidal.dal.jdbc.Readset;
import org.unidal.dal.jdbc.Updateset;

public class DailyReportDao extends AbstractDao {
/* 11 */   public DailyReport createLocal() { return new DailyReport(); }





/* 17 */   public int deleteByPK(DailyReport proto) throws DalException { return getQueryEngine().deleteSingle(DailyReportEntity.DELETE_BY_PK, proto); }





/* 23 */   public int deleteByDomainNamePeriod(DailyReport proto) throws DalException { return getQueryEngine().deleteSingle(DailyReportEntity.DELETE_BY_DOMAIN_NAME_PERIOD, proto); }




  public List<DailyReport> queryLatestReportsByDomainName(String domain, String name, int limits, Readset<DailyReport> readset) throws DalException {
/* 29 */     DailyReport proto = new DailyReport();

/* 31 */     proto.setDomain(domain);
/* 32 */     proto.setName(name);
/* 33 */     proto.setLimits(limits);

/* 35 */     return getQueryEngine().queryMultiple(DailyReportEntity.QUERY_LATEST_REPORTS_BY_DOMAIN_NAME, proto, readset);
  }






  public DailyReport findByPK(int keyId, Readset<DailyReport> readset) throws DalException {
/* 44 */     DailyReport proto = new DailyReport();

/* 46 */     proto.setKeyId(keyId);

/* 48 */     return (DailyReport)getQueryEngine().querySingle(DailyReportEntity.FIND_BY_PK, proto, readset);
  }






  public DailyReport findByDomainNamePeriod(String domain, String name, Date period, Readset<DailyReport> readset) throws DalException {
/* 57 */     DailyReport proto = new DailyReport();

/* 59 */     proto.setDomain(domain);
/* 60 */     proto.setName(name);
/* 61 */     proto.setPeriod(period);

/* 63 */     return (DailyReport)getQueryEngine().querySingle(DailyReportEntity.FIND_BY_DOMAIN_NAME_PERIOD, proto, readset);
  }








/* 73 */   protected Class<?>[] getEntityClasses() { return new Class[] { DailyReportEntity.class }; }



/* 77 */   public int insert(DailyReport proto) throws DalException { return getQueryEngine().insertSingle(DailyReportEntity.INSERT, proto); }





/* 83 */   public int updateByPK(DailyReport proto, Updateset<DailyReport> updateset) throws DalException { return getQueryEngine().updateSingle(DailyReportEntity.UPDATE_BY_PK, proto, updateset); }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-core-3.0.0.jar!/com/dianping/cat/core/dal/DailyReportDao.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */